package com.xinzhidi.web.alarmSetting.domain.dto;

import com.xinzhidi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;


/**
 * 告警设置UpdDto对象 alarm_setting
 *
 * @author ruoyi
 * @date 2023-05-31
 */
@ApiModel(value = "告警设置UpdDto对象")
@Data
@EqualsAndHashCode(callSuper = false)
public class AlarmSettingUpdDto {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "告警设置id")
    @NotNull(message = "告警设置id不能为空")
    @Min(value = 0, message = "告警设置id不能比0小")
    private Long id;

    @ApiModelProperty(value = "设备种类（字典alarm_type  1：通讯异常  2：超限异常  3：波动异常）")
    @NotBlank(message = "设备种类不能为空")
    @Excel(name = "设备种类")
    private String alarmType;

    @ApiModelProperty(value = "告警类型（字典control_tactics）")
    @Excel(name = "告警类型")
    private String indexType;

    @ApiModelProperty(value = "设备类型（字典equipment_type）")
    private String equipmentType;

    @ApiModelProperty(value = "检查字段")
    private String checkField;

    @ApiModelProperty(value = "目标值")
    @Min(value = 0, message = "目标值不能小于0")
    private BigDecimal targetValue;

    @ApiModelProperty(value = "最大值")
    private BigDecimal maxValue;

    @ApiModelProperty(value = "最小值")
    private BigDecimal minValue;

    @ApiModelProperty(value = "波动值")
    private BigDecimal fluctuatingValue;

    @ApiModelProperty(value = "超过次数（指通讯异常超过多少次报警）")
    private Integer exceedTimes;

    @ApiModelProperty(value = "告警等级")
    @Excel(name = "告警等级")
    @Size(max = 100, message = "告警等级长度不能大于100")
    private String alarmLevel;

    @ApiModelProperty(value = "告警推送间隔（单位：分钟）")
    @Excel(name = "告警推送间隔", readConverterExp = "单=位：分钟")
    @Min(value = 0, message = "告警推送间隔（单位：分钟）不能比0小")
    private Integer pushInterval;

    @ApiModelProperty(value = "是否推送（0：是  1：否  默认0）")
    @Excel(name = "是否推送", readConverterExp = "0=：是,1=：否,默=认0")
    @Size(max = 100, message = "是否推送（0：是  1：否  默认0）长度不能大于100")
    private String pushStatus;

    @ApiModelProperty(value = "描述")
    @Excel(name = "描述")
    private String remark;

}
